package com.mp.dao;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.mp.entity.Employee;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring-dao.xml")
public class TestActiveRecord {
	@Test
	public void test() {
		Employee employee = new Employee();
		employee.setName("亦菲小姐姐");
		employee.setAge(18);
		employee.setSex("女");
		//执行插入操作，此时不再需要注入mapper，不用调用mapper的insert，而是调用对象本身的相关方法
		employee.insert();
	}
}
